package com.qfjy.homework.dingyuxiang;

/**
 * @version : 1.0
 * @outhor : 丁宇翔
 * @date : 2022/6/29 19:34
 */
//使用 Game 的模板方法 play() 来演示游戏的定义方式
public class TemplatePatternDemo {
    public static void main(String[] args) {

        Game game = new Cricket();
        game.play();
        System.out.println();
        game = new Football();
        game.play();
    }
}
//执行程序，输出结果：
/*
* Cricket Game Initialized! Start playing.
Cricket Game Started. Enjoy the game!
Cricket Game Finished!

Football Game Initialized! Start playing.
Football Game Started. Enjoy the game!
Football Game Finished!
* */